<!DOCTYPE HTML>
<html>
<head>
	<meta http-equiv="content-type" content="text/html" />
	<meta name="author" content="KennyVu" />

	<title><?php bloginfo("name");?></title>
    <link href="<?php bloginfo('stylesheet_url')?>" rel="stylesheet" type="text/css"/>
    <link href="<?php echo bloginfo('template_directory') . '/css/reset.css'; ?>" rel="stylesheet" type="text/css"/>
    <link href="<?php echo bloginfo('template_directory') . '/css/layout.css'; ?>" rel="stylesheet" type="text/css"/>
    <link href="<?php echo bloginfo('template_directory') . '/css/typography.css'; ?>" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="<?php echo bloginfo('template_directory') . '/js/jquery-1.9.0.js'; ?>" ></script>
    <script type="text/javascript" src="<?php echo bloginfo('template_directory') . '/js/jquery-ui.js'; ?>" ></script>
    <script type="text/javascript" src="<?php echo bloginfo('template_directory') . '/js/jquery.validate.js'; ?>" ></script>
</head>

<body>

<div id="wrapper" class="width-100per">
    <!---- HEADER ----->
    <div id="header-cover" class="width-100per">
        <div id="header" class="div-center width-x1000">
            <p class="padding-left-x10 uppercase floatleft" >
            <a id="logo" class="uppercase" href="<?php bloginfo('siteurl') ?>"><span><?php bloginfo('title')?></span></a>
            <span id="description" ><?php bloginfo('description')?></span>
            </p>
            <!---- NAVIGATE MENU ----->
            <div id="navigate-menu" class="floatright small" style="color: #d5d5d5; letter-spacing: 1px;">
                <?php
                    wp_nav_menu(array('theme_location' => 'menu-1','fallback_cb' => 'alert_menu','container_class' => 'nav_menu_items'));
                ?>
            </div>
            <script>
            $(document).ready(function() {
                var path = window.location.href;
                if ( path )
                {
                    $('.nav_menu_items li a[href$="' + path + '"]').parent().addClass( 'active');
                }
            });
            </script>
            <div class="clear"></div>
        </div>
    </div>
    
    <!---- FEATURE IMAGE SLIDER----->
    <div id="feature-image-cover" class="width-100per">
        <div id="feature-image" class="div-center bg-color-white width-x1000"></div>
    </div>

    <!---- BODY ----->
    <div id="body" class="width-100per bg-color-white">
        <div id="content" class="div-center width-x1000 bg-color-white padding-top-x10 padding-bottom-x10">
            <div class="div-height-x20 padding-left-x10 padding-right-x10 " style="border-bottom: 1px solid #ccc; height: 40px;">
                <span class="floatright lineheight-x30 color-888 small">
                    <?php $today = getdate();
                        echo 'Hôm nay, ngày ' . $today["mday"] . ' tháng ' . $today["mon"] . ' năm ' . $today["year"]
                    ?>
                </span>
                <form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
                <div class="floatleft searchbox">
                    <span class="color-888 small">Search: </span>
                    <input type="text" value="" name="search" id="searchbox" class="search" />
                    <input type="submit" id="searchsubmit" name="searchsubmit" value="Search" class="searchsubmit" />
                </div>
                </form>
                <div class="clear"></div>
            </div>
            <!--- New Deal -->
            <p class="title-mini">Khuyến mãi mới</p>
            <div class="product-block">
                <?php
                    query_posts('posts_per_page=5');
                    if(have_posts()) : while(have_posts()) : the_post(); 
                ?>
                <?php 
                    $img = get_post_meta($post -> ID, "imagelink1",true);
                    $price = get_post_meta($post -> ID, "price",true);
                    $discount = get_post_meta($post -> ID, "discount",true);
                ?>
                <a href="<?php the_permalink();?>" class="product_links">
                    <?php if ( has_post_thumbnail() ) {
                    	the_post_thumbnail('thumbnail', array('class' => 'product-items'));
                        }
                        else if($img != '') {
                            echo '<div style=" position: relative; background: url('. $img . ') 0 0 no-repeat; background-size: cover;" class="product-items">
                            <div class="product-info" style="background: rgba(0,0,0,0.5); width: 100%; position: absolute; bottom: 0; left: 0;">
                                <p class="product-title">' . get_the_title() . '</p>
                                <p class="product-price">' . $price . '</p>
                                <p class="product-pricevn">' . $discount . '</p>
                            </div></div>';
                        }
                        else {
                        	echo '<div style=" background: url(' . get_bloginfo( 'template_directory' ) . '/images/no_image.gif) 0 0 no-repeat; background-size: cover;" class="product-items"></div>';
                        }
                    ?>
                </a>
                <?php endwhile; wp_reset_query();?>
                <?php else: ?>
                    <h1>Sorry, There are no posts to display</h1>
                <?php endif;  ?>
                <div class="clear"></div>
            </div>
            <!-- Đang bán -->
            <p class="title-mini">Sản phẩm đang bán</p>
            <div class="product-block">
                <?php
                    query_posts('posts_per_page=5');
                    if(have_posts()) : while(have_posts()) : the_post(); 
                ?>
                <?php 
                    $img = get_post_meta($post -> ID, "imagelink1",true);
                    $price = get_post_meta($post -> ID, "price",true);
                    $pricevn = get_post_meta($post -> ID, "pricevn",true);
                ?>
                <a href="<?php the_permalink();?>" class="product_links">
                    <?php if ( has_post_thumbnail() ) {
                    	the_post_thumbnail('thumbnail', array('class' => 'product-items'));
                        }
                        else if($img != '') {
                            echo '<div style="position: relative; background: url('. $img . ') 0 0 no-repeat; background-size: cover;" class="product-items">
                            <div class="product-info" style="background: rgba(0,0,0,0.5); width: 100%; position: absolute; bottom: 0; left: 0;">
                                <p class="product-title">' . get_the_title() . '</p>
                                <p class="product-price">' . $price . '</p>
                                <p class="product-pricevn">' . $discount . '</p>
                            </div></div>';
                        }
                        else {
                        	echo '<div style=" background: url(' . get_bloginfo( 'template_directory' ) . '/images/no_image.gif) 0 0 no-repeat; background-size: cover;" class="product-items"></div>';
                        }
                    ?>
                </a>
                <?php endwhile; wp_reset_query();?>
                <?php else: ?>
                    <h1>Sorry, There are no posts to display</h1>
                <?php endif;  ?>
                <div class="clear"></div>
            </div>
            
            <div class=" width-x1000 div-center margin-top-x10 padding-left-x10 border-02 padding-bottom-x10 padding-top-x10">
                <div id="aboutus" class="floatleft">
                    <p class="title-mini">Về chúng tôi</p>
                    <p style="font-size: large; padding-right: 20px;"> 
                    <img src="<?php echo get_bloginfo( 'template_directory' ) . '/images/avatar.png' ?>" class="floatleft" style="margin-top: 5px; margin-left: 20px; margin-right: 10px;" />
                     Vơi phương châm izship - Easy way for People, chúng tôi hi vọng mang lại cầu nối cho khách hàng tại Việt Nam đến các thương hiệu tại Mỹ, nhằm tiết kiệm chi phí và thơi gian, đồng thời giảm bớt các vấn đề thủ tục rườm rà. 
                     Chúng tôi là izship Việt Nam - Dịch vụ gởi hàng từ Mỹ về Việt Nam</p>
                    
                </div>
                <div id="facebookcover" class="floatright">
                    <span style="font-family: inherit; font-size: 24px; color: #98d441">Facebook</span>
                    <div id="fb-root"></div>
                    <script>(function(d, s, id) {
                      var js, fjs = d.getElementsByTagName(s)[0];
                      if (d.getElementById(id)) return;
                      js = d.createElement(s); js.id = id;
                      js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
                      fjs.parentNode.insertBefore(js, fjs);
                    }(document, 'script', 'facebook-jssdk'));</script>
                    <div class="fb-like-box" data-href="https://www.facebook.com/pages/Izship-Viet-Nam/341085546020209" data-width="292" data-show-faces="true" data-stream="false" data-show-border="false" data-header="false"></div>
                </div>
                <div class="clear"></div>
            </div>
        </div>
    </div> 
    <!---- FOOTER ---->
    <div id="footer-cover" class="div-center width-100per bg-color-white">
        <div class="width-100per" style="height: 8px; border-bottom: 0.12em dashed #555;" ></div>
        <div id="footer" class="div-center width-x1000"></div>
        <div class="width-100per" style="height: 8px; border-bottom: 0.12em dashed #555;" ></div>
        <div id="author" class="width-100per small-x" >&COPY;<?php bloginfo('title');?> 2013 - designed by DinhThu</div>
        <div class="clear"></div>
    </div>
</div>

</body>
</html>